home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / octa209s.zip / octave-2.09 / liboctave / base-lu.h < prev    next >
C/C++ Source or Header  |  1996-03-29  |  1KB  |  72 lines

  1. /*
  2.  
  3. Copyright (C) 1996 John W. Eaton
  4.  
  5. This file is part of Octave.
  6.  
  7. Octave is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the
  9. Free Software Foundation; either version 2, or (at your option) any
  10. later version.
  11.  
  12. Octave is distributed in the hope that it will be useful, but WITHOUT
  13. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15. for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with Octave; see the file COPYING.  If not, write to the Free
  19. Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. */
  22.  
  23. #if !defined (octave_base_lu_h)
  24. #define octave_base_lu_h 1
  25.  
  26. #if defined (__GNUG__)
  27. #pragma interface
  28. #endif
  29.  
  30. #include "MArray.h"
  31.  
  32. template <class lu_type, class lu_elt_type, class p_type, class p_elt_type>
  33. class base_lu
  34. {
  35. public:
  36.  
  37.   base_lu (void) { }
  38.  
  39.   base_lu (const base_lu& a) : a_fact (a.a_fact), ipvt (a.ipvt) { }
  40.  
  41.   base_lu& operator = (const base_lu& a)
  42.     {
  43.       if (this != &a)
  44.     {
  45.       a_fact = a.a_fact;
  46.       ipvt = a.ipvt;
  47.     }
  48.       return *this;
  49.     }
  50.  
  51.   ~base_lu (void) { }
  52.  
  53.   lu_type L (void) const;
  54.  
  55.   lu_type U (void) const;
  56.  
  57.   p_type P (void) const;
  58.  
  59. protected:
  60.  
  61.   lu_type a_fact;
  62.   MArray<int> ipvt;
  63. };
  64.  
  65. #endif
  66.  
  67. /*
  68. ;;; Local Variables: ***
  69. ;;; mode: C++ ***
  70. ;;; End: ***
  71. */
  72.